<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:ctl="http://arche.auction.co.kr/WebControl/XmlControl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:s="http://schema.auction.co.kr/Arche.Stores.xsd" xmlns:ms="urn:schemas-microsoft-com:xslt"
  xmlns:ARCHE="http://www.auction.co.kr/xsltFunc" exclude-result-prefixes="ctl s ms xsl ARCHE">
  <xsl:output indent="no" method="html" encoding="utf-8" />
  <xsl:param name="Params" select="/ctl:ControlData/ctl:Params" />
  <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  Start TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
  <xsl:template match="/">
    <TABLE cellSpacing="1" cellPadding="3" align="center" border="0">
      <xsl:attribute name="width">
        <xsl:value-of select="$Params/Width" />
      </xsl:attribute>
      <TBODY>
        <xsl:apply-templates select="ctl:ControlData/s:StoreViewT" mode="Header" />
        <TR>
          <TD class="left_menu_pointcolor" height="25">
            <IMG height="11" hspace="5" width="11">
              <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />bull_menu1.gif</xsl:attribute>
            </IMG>
            <SPAN class="left_menu_text">
              <STRONG>카테고리</STRONG>
            </SPAN>
          </TD>
        </TR>
        <TR>
          <TD class="store_background">
            <TABLE id="Table2" cellSpacing="0" cellPadding="0" width="150" align="center" border="0">
              <xsl:apply-templates select="ctl:ControlData/*/s:StoreCategoryAndItemCountT" />
            </TABLE>
          </TD>
        </TR>
        <TR>
          <TD class="left_menu_pointcolor" height="25">
            <IMG height="11" hspace="5" width="11">
              <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />bull_menu1.gif</xsl:attribute>
            </IMG>
            <SPAN class="left_menu_text">
              <STRONG>컨텐츠</STRONG>
            </SPAN>
          </TD>
        </TR>
        <TR>
          <TD class="store_background">
            <TABLE id="Table3" cellSpacing="0" cellPadding="0" width="150" align="center" border="0">
              <xsl:apply-templates select="ctl:ControlData/*/s:ContentsBaseT" />
            </TABLE>
          </TD>
        </TR>
      </TBODY>
    </TABLE>
    <TABLE id="Table4" cellSpacing="0" cellPadding="0" width="100%" border="0">
      <TR>
        <TD bgColor="#cccccc">
          <IMG height="1" width="1">
            <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />blank.gif</xsl:attribute>
          </IMG>
        </TD>
      </TR>
    </TABLE>
    <xsl:if test="$Params/ManageLinkVisible = 'True'">
      <xsl:apply-templates select="ctl:ControlData/s:StoreViewT" mode="BBS" />
    </xsl:if>
  </xsl:template>
  <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  StoreViewT TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
  <xsl:template match="s:StoreViewT" mode="Header">
    <TR>
      <TD class="left_menu_pointcolor" height="60">
        <TABLE id="Table1" cellSpacing="1" cellPadding="3" width="95%" align="center" border="0">
          <TR>
            <TD width="34">
              <A>
              <xsl:attribute name="href">/<xsl:value-of select="@Url"/></xsl:attribute>
                <IMG height="34" width="35" border="0">
                  <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />ic_home.gif</xsl:attribute>
                </IMG>
              </A>
            </TD>
            <TD class="storehome_textsize">
              <A>
              <xsl:attribute name="href">/<xsl:value-of select="@Url"/></xsl:attribute>
                <SPAN class="storehome_textsize" style="WORD-BREAK: break-all">
                  <STRONG>
                    <xsl:value-of select="@Name" />
                    <!--<SCRIPT>document.writeln(cutString("The Outdoor Store", "20", "..."))</SCRIPT>-->
                  </STRONG>
                </SPAN>
              </A>
            </TD>
          </TR>
        </TABLE>
      </TD>
    </TR>
    <TR>
      <TD class="left_menu_pointcolor" height="25">
        <IMG height="11" hspace="5" width="11">
          <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />bull_menu1.gif</xsl:attribute>
        </IMG>
        <SPAN class="left_menu_text">
          <STRONG>검색</STRONG>
        </SPAN>
      </TD>
    </TR>
    <TR>
      <TD class="store_background" height="40" align="center">
        <INPUT maxLength="15" size="12" name="user_query">
			<xsl:attribute name="value"><xsl:value-of select="$Params/UserQuery" /></xsl:attribute>
        </INPUT>
        <Image height="22" width="41" align="absMiddle">
          <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />search_go.gif</xsl:attribute>
          <xsl:attribute name="onclick">
            <xsl:text>window.navigate('http://storesdev.auction.co.kr/auction/front/searchForm.aspx</xsl:text>
            <xsl:text>?user_query=' + escape(document.forms[0].user_query.value) + '&amp;store_id=</xsl:text>
            <xsl:value-of select="@ID" />
            <xsl:text>');</xsl:text>
          </xsl:attribute>
        </Image>
      </TD>
    </TR>
  </xsl:template>
  <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  Category TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
  <xsl:template match="s:StoreCategoryAndItemCountT">
    <TR>
      <TD align="center" width="20" height="35">
        <IMG height="9" width="8">
          <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />bull_cat1.gif</xsl:attribute>
        </IMG>
      </TD>
      <TD width="130" height="35">
        <A class="mainmenu">
          <xsl:attribute name="href">/auction/front/store.aspx?store_id=<xsl:value-of select="@StoreID" />&amp;categorySeqNo=<xsl:value-of select="@SeqNo" /></xsl:attribute>
          <SPAN class="store_intro_text">
            <U>
              <xsl:value-of select="concat(@Name,'[',@ItemCount,']')" />
            </U>
          </SPAN>
        </A>
        <xsl:if test="@IconType">
          <IMG height="10" hspace="3" width="26" border="0">
            <xsl:choose>
              <xsl:when test="@IconType = '1'">
                <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />icon_new.gif</xsl:attribute>
              </xsl:when>
              <xsl:when test="@IconType = '2'">
                <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />icon_cool.gif</xsl:attribute>
              </xsl:when>
              <xsl:when test="@IconType = '3'">
                <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />icon_sale.gif</xsl:attribute>
              </xsl:when>
            </xsl:choose>
          </IMG>
        </xsl:if>
      </TD>
    </TR>
    <TR>
      <TD align="center" colSpan="2">
        <IMG height="1" width="150">
          <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />l_menu_dot.gif</xsl:attribute>
        </IMG>
      </TD>
    </TR>
  </xsl:template>
  <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  Content TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
  <xsl:template match="s:ContentsBaseT">
    <TR>
      <TD align="center" width="20" height="35">
        <IMG height="9" width="8">
          <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />bull_cat1.gif</xsl:attribute>
        </IMG>
      </TD>
      <TD width="130" height="35">
        <A class="mainmenu">
          <xsl:attribute name="href">/auction/front/Content.aspx?store_id=<xsl:value-of select="@StoreID" />&amp;ctsSeqNo=<xsl:value-of select="@SeqNo" /></xsl:attribute>
          <SPAN class="store_intro_text">
            <U>
              <xsl:value-of select="@Name" />
            </U>
          </SPAN>
        </A>
      </TD>
    </TR>
    <TR>
      <TD align="center" colSpan="2">
        <IMG height="1" width="150">
          <xsl:attribute name="src"><xsl:value-of select="$Params/StoreImageBase" />l_menu_dot.gif</xsl:attribute>
        </IMG>
      </TD>
    </TR>
  </xsl:template>
  <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  StoreViewT [BBS] TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
  <xsl:template match="s:StoreViewT" mode="BBS">
    <TABLE id="Table5" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
      <TR>
        <TD align="center" height="10">
          <IMG height="10" width="0">
            <xsl:attribute name="src"><xsl:value-of select="$Params/ImageBase" />blank.gif</xsl:attribute>
          </IMG>
        </TD>
      </TR>
      <TR>
        <TD align="center" height="25">
          <IMG style="CURSOR: hand">
            <xsl:attribute name="src"><xsl:value-of select="$Params/ImageBase" />but_bbs.gif</xsl:attribute>
            <xsl:attribute name="onclick">
              <xsl:text>window.open('http://www.auction.co.kr/community/homepi/homepi_board.asp?sellerID=</xsl:text>
              <xsl:value-of select="OwnerID" />
              <xsl:text>', 'community')</xsl:text>
            </xsl:attribute>
          </IMG>
        </TD>
      </TR>
    </TABLE>
  </xsl:template>
  <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  nbsp TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
  <xsl:template name="nbsp">
    <xsl:param name="Index" select="1" />
    <xsl:param name="Count" select="1" />
    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
    <xsl:if test="$Index &lt; $Count">
      <xsl:call-template name="nbsp">
        <xsl:with-param name="Index" select="$Index + 1" />
        <xsl:with-param name="Count" select="$Count" />
      </xsl:call-template>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>